2c344d
@@ -337,7 +337,7 @@
public void close(boolean abort) throws HiveException {
         }
         int exitVal = 0;
         if (scriptPid != null)
-          scriptPid.waitFor();
+          exitVal = scriptPid.waitFor();
         if (exitVal != 0) {
           LOG.error("Script failed with code " + exitVal);
           new_abort = true;
